$item)
{
if (strlen($k) == 32)
{
$loggedInHash = $k;
}
}
// only keep the initial part if there's a forward slash
$shortUrl = current(explode("/", str_replace("~i", "", $_REQUEST['_page_url'])));
$file = file::loadByShortUrl($shortUrl);
// check whether we can display the delete/password options
$showAll = false;
if ($file->deleteHash == $loggedInHash)
{
$showAll = true;
}
// double check the owner for logged in user
if (($showAll == false) && ($file))
{
if ($file->userId == $Auth->id)
{
$showAll = true;
}
}
}
$user = userPeer::loadUserById($Auth->id);
// load file details
if (!$file)
{
/* if no file found, redirect to home page */
coreFunctions::redirect(WEB_ROOT . "/index." . SITE_CONFIG_PAGE_EXTENSION);
}
// only show this page if active file
if ($file->statusId != 1)
{
// redirect to file in order to show error
coreFunctions::redirect($file->getFullShortUrl());
}
// check file permissions, allow owners, non user uploads and admin/mods
if($file->userId != null)
{
if((($file->userId != $Auth->id) && ($Auth->level_id < 10)))
{
// if this is a private file
if(coreFunctions::getOverallPublicStatus($file->userId, $file->folderId, $file->id) == false)
{
$errorMsg = t("error_file_is_not_publicly_shared", "File is not publicly available.");
coreFunctions::redirect(coreFunctions::getCoreSitePath() . "/error." . SITE_CONFIG_PAGE_EXTENSION . "?e=" . urlencode($errorMsg));
}
}
}
// setup page
define("PAGE_NAME", t("share_file_title", "File Information"));
define("PAGE_DESCRIPTION", t("file_information_description", "Information about") . ' ' . $file->originalFilename);
define("PAGE_KEYWORDS", strtolower($file->originalFilename) . t("file_information_meta_keywords", ", share, information, file, upload, download, site"));
define("TITLE_DESCRIPTION_LEFT", t("file_information_left_description", "Information about") . ' ' . $file->originalFilename);
define("TITLE_DESCRIPTION_RIGHT", t("share_files_title_page_description_right", ""));
// include header
require_once(SITE_TEMPLATES_PATH . '/partial/_header.inc.php');
?>
originalFilename, null, 70); ?>
()
id != $file->userId): ?>
()
|
fileSize); ?>
|
isPublic == 1) && ($user->isPublic == 1) && coreFunctions::getUserFoldersPublicStatus($file->folderId) == true): ?>
|
getLargeIconPath()): ?>
|
isPublic == 1) && ($user->isPublic == 1) && coreFunctions::getUserFoldersPublicStatus($file->folderId) == true): ?>
getHtmlLinkCode(); ?>
|
getForumLinkCode(); ?>
|
canViewStats();
if (($canViewStats) || ($showAll == true))
{
?>